package com.ruoyi.edh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.edh.domain.EdhGoodsSpecifications;
import com.ruoyi.edh.mapper.EdhGoodsSpecificationsMapper;
import com.ruoyi.edh.service.IEdhGoodsSpecificationsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 易订货-商品规格Service业务层处理
 * 
 * @author xxx
 * @date 2020-09-02
 */
@Service
public class EdhGoodsSpecificationsServiceImpl implements IEdhGoodsSpecificationsService
{
    @Autowired
    private EdhGoodsSpecificationsMapper edhGoodsSpecificationsMapper;

    /**
     * 查询易订货-商品规格
     * 
     * @param id 易订货-商品规格ID
     * @return 易订货-商品规格
     */
    @Override
    public EdhGoodsSpecifications selectEdhGoodsSpecificationsById(Long id)
    {
        return edhGoodsSpecificationsMapper.selectEdhGoodsSpecificationsById(id);
    }

    /**
     * 查询易订货-商品规格列表
     * 
     * @param edhGoodsSpecifications 易订货-商品规格
     * @return 易订货-商品规格
     */
    @Override
    public List<EdhGoodsSpecifications> selectEdhGoodsSpecificationsList(EdhGoodsSpecifications edhGoodsSpecifications)
    {
        return edhGoodsSpecificationsMapper.selectEdhGoodsSpecificationsList(edhGoodsSpecifications);
    }

    /**
     * 新增易订货-商品规格
     * 
     * @param edhGoodsSpecifications 易订货-商品规格
     * @return 结果
     */
    @Override
    public int insertEdhGoodsSpecifications(EdhGoodsSpecifications edhGoodsSpecifications)
    {
        edhGoodsSpecifications.setCreateTime(DateUtils.getNowDate());
        return edhGoodsSpecificationsMapper.insertEdhGoodsSpecifications(edhGoodsSpecifications);
    }

    /**
     * 修改易订货-商品规格
     * 
     * @param edhGoodsSpecifications 易订货-商品规格
     * @return 结果
     */
    @Override
    public int updateEdhGoodsSpecifications(EdhGoodsSpecifications edhGoodsSpecifications)
    {
        edhGoodsSpecifications.setUpdateTime(DateUtils.getNowDate());
        return edhGoodsSpecificationsMapper.updateEdhGoodsSpecifications(edhGoodsSpecifications);
    }

    /**
     * 批量删除易订货-商品规格
     * 
     * @param ids 需要删除的易订货-商品规格ID
     * @return 结果
     */
    @Override
    public int deleteEdhGoodsSpecificationsByIds(Long[] ids)
    {
        return edhGoodsSpecificationsMapper.deleteEdhGoodsSpecificationsByIds(ids);
    }

    /**
     * 删除易订货-商品规格信息
     * 
     * @param id 易订货-商品规格ID
     * @return 结果
     */
    @Override
    public int deleteEdhGoodsSpecificationsById(Long id)
    {
        return edhGoodsSpecificationsMapper.deleteEdhGoodsSpecificationsById(id);
    }
}
